package com.china08.yxyapi.entity.mg.sws;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Id;

import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * 学校公告
 * 
 * @author Ertao.Fang
 * 
 */
@Document(collection = "yxy.sws.article")
public class SwsArticle extends MongoBaseEntityNoId {

    /**
     * 
     */
    private static final long serialVersionUID = -4725093159771025574L;

    @Id
    private String id;

    /** 是否置顶 */
    @Field(value = "is_sticky")
    private Boolean isSticky = false;

    /** 作者 */
    @Field(value = "author")
    private String author;

    /** 栏目一级ID */
    @Field(value = "section1_id")
    private String section1Id;

    /** 栏目二级ID */
    @Field(value = "section2_id")
    private String section2Id;

    /** 排列序号 **/
    @Field(value = "order_num")
    private Integer orderNum = 100;

    /** 标题图片名称,用于手机端,列表图片显示 */
    @Field(value = "face_img")
    private String faceImg;

    /** 标题 */
    @Field(value = "title")
    private String title;

    /** 摘要 */
    @Field(value = "summary")
    private String summary;

    /** 内容 */
    @Field(value = "content")
    private String content;

    /** 学校:ID */
    @Field(value = "owner_school_id")
    private String ownerSchoolId;

    /** 发送者ID */
    @Field(value = "sender_id")
    private String senderId;

    /** 发送者名称 */
    @Field(value = "sender_name")
    private String senderName;

    /**
     * 发布状态 DRAFT: description "草稿";PUBLISHED: "已发布";
     */
    @Field(value = "announcement_status")
    private String announcementStatus = "PUBLISHED";

    /** 创建时间 */
    @Field(value = "create_date")
    private Date createDate = new Date(System.currentTimeMillis());

    /** 修改时间 */
    @Field(value = "update_date")
    private Date updateDate = new Date(System.currentTimeMillis());

    /** 发布时间 */
    @Field(value = "publish_date")
    private Date publishDate = new Date(System.currentTimeMillis());

    /**
     * 展示时间
     */
    @Field(value = "show_date")
    private Date showDate;

    /** 页面浏览量 */
    @Field(value = "pv")
    private Integer pv = 1;

    /**
     * 审核状态 -1--审核拒绝 0--待审核 1--审核通过
     */
    @Field(value = "audit_status")
    private Integer auditStatus = 1;

    /** 已推送给教育局:0-否,1-是 */
    @Field(value = "recommend_to_bureau")
    private Boolean recommendToBureau = Boolean.FALSE;

    /** 附件:文件名称 */
    @Field(value = "attachment_file_name")
    private String attachmentFileName;

    /** 附件:下载地址 */
    @Field(value = "attachment_download_url")
    private String attachmentDownloadUrl;

    /** 推荐 */
    @Field(value = "recommend")
    private boolean recommend;

    // getters and setters

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public String getOwnerSchoolId() {
        return ownerSchoolId;
    }

    public void setOwnerSchoolId(String ownerSchoolId) {
        this.ownerSchoolId = ownerSchoolId;
    }

    public String getSenderId() {
        return senderId;
    }

    public void setSenderId(String senderId) {
        this.senderId = senderId;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFaceImg() {
        return faceImg;
    }

    public void setFaceImg(String faceImg) {
        this.faceImg = faceImg;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public Boolean getIsSticky() {
        return isSticky;
    }

    public void setIsSticky(Boolean isSticky) {
        this.isSticky = isSticky;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getPv() {
        return pv;
    }

    public void setPv(Integer pv) {
        this.pv = pv;
    }

    public Boolean getRecommendToBureau() {
        return recommendToBureau;
    }

    public void setRecommendToBureau(Boolean recommendToBureau) {
        this.recommendToBureau = recommendToBureau;
    }

    public String getAnnouncementStatus() {
        return announcementStatus;
    }

    public void setAnnouncementStatus(String announcementStatus) {
        this.announcementStatus = announcementStatus;
    }

    public Date getShowDate() {
        return showDate;
    }

    public void setShowDate(Timestamp showDate) {
        this.showDate = showDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    public void setUpdateDate(Timestamp updateDate) {
        this.updateDate = updateDate;
    }

    public void setPublishDate(Timestamp publishDate) {
        this.publishDate = publishDate;
    }

    public Integer getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(Integer auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public void setShowDate(Date showDate) {
        this.showDate = showDate;
    }

    public String getAttachmentFileName() {
        return attachmentFileName;
    }

    public void setAttachmentFileName(String attachmentFileName) {
        this.attachmentFileName = attachmentFileName;
    }

    public String getAttachmentDownloadUrl() {
        return attachmentDownloadUrl;
    }

    public void setAttachmentDownloadUrl(String attachmentDownloadUrl) {
        this.attachmentDownloadUrl = attachmentDownloadUrl;
    }

    public boolean getRecommend() {
        return recommend;
    }

    public void setRecommend(boolean recommend) {
        this.recommend = recommend;
    }

    public String getSection1Id() {
        return section1Id;
    }

    public void setSection1Id(String section1Id) {
        this.section1Id = section1Id;
    }

    public String getSection2Id() {
        return section2Id;
    }

    public void setSection2Id(String section2Id) {
        this.section2Id = section2Id;
    }
}
